/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.action;

import cassys.dataaccess.DAOException;
import cassys.datatransferobjects.EvaluationItemDTO;
import cassys.datatransferobjects.ResultDTO;
import cassys.datatransferobjects.TeamResultDTO;
import cassys.delegates.ResultViewDelegate;

import java.util.ArrayList;

/**
 *
 * @author Priyanka
 */
public class ResultViewAction extends CassysSupport {

    private ResultViewDelegate delegate;
    private ArrayList<ResultDTO> results;

    public ResultViewAction() {
        delegate = new ResultViewDelegate();
    }

    @Override
    public String execute() throws Exception {
        return "summary";
    }

    public ArrayList<ResultDTO> getResults() throws DAOException, Exception {
        results = delegate.getTotalSummaryForAllStudents();
        return results;
    }

    public ArrayList<TeamResultDTO> getTeamResults() throws DAOException, Exception {
        return delegate.getTotalSummaryForAllTeam();
    }
     
}